﻿using System.Runtime.Serialization;

using RayDen.Library.Core.Primitives;
namespace RayDen.Library.Entity.Frames {
    [DataContract]
    [KnownType(typeof(FrameVolumeArea))]
    public class FrameVolumeArea : FrameElement {
        public const string VolumeAreaMeshNameName = "VolumeArea.MeshName";
        public const string VolumeAreaBoundsName = "VolumeArea.Bounds";
        public const string VolumeAreaSigmaEName = "VolumeArea.Emittance";
        public const string VolumeAreaSigmaSName = "VolumeArea.Scattering";
        public const string VolumeAreaSigmaAName = "VolumeArea.Absorbance";
        [DataMember]
        public string MeshName;

        [DataMember]
        public ConfigurableEntity Parameters { get; set; }
        public RgbSpectrum Emittance
        {
            get { return this.Parameters.Get<RgbSpectrum>(VolumeAreaSigmaEName); }
        }

        public RgbSpectrum Scattering
        {
            get
            {
                 return this.Parameters.Get<RgbSpectrum>(VolumeAreaSigmaSName); 
            }
        }

        public RgbSpectrum Absorbance
        {
            get
            {
                return this.Parameters.Get<RgbSpectrum>(VolumeAreaSigmaAName);
            }
        }

    }
}
